package com.Maykk.Demo02;

/**
 * @ClassName: Demo02
 * @Description: TODO StringBuilder 中的常用方法练习
 * @Author: MaykkStar@163.com
 */
public class Demo02 {
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder("Hello");
        // append 向sb对象中添加字符
        sb.append(" Java").append(" StringBuilder").append(" !~");
        System.out.println(sb);
        System.out.println("=======================================");
        // reverse 反向存储
        sb.reverse();
        System.out.println(sb);
        System.out.println("=======================================");
        sb.reverse(); // 处理字符串为正向
        sb.replace(0, 5, "你好");
        System.out.println(sb);
    }
}
